var type=""; 
var brversion = /MSIE ([0-8.]+)/.exec(window.navigator.userAgent);
if(brversion && brversion.length && parseInt(brversion[1]) < 10){
  alert("您使用的浏览器版本过低,建议您使用360浏览器极速模式,以保证页面的正常显示");
  throw "brower version too low!";
}
var selfPath = "";
(function(){
  // 获取现在已经加载的所有script
  var scripts = document.getElementsByTagName('script');
  if(scripts.length){
    // 获取最近一个加载的script，即这个js本身
    var lastScript = scripts[scripts.length-1];
    // 获取此js的路径  
    //var scriptSrc = lastScript.src;
    var scriptSrc = lastScript.src;
    type=getQueryString("type",scriptSrc);
    console.log('----->', scriptSrc);   
   
    //去掉文件名
    selfPath = scriptSrc.replace(/(\/)([^\/]*)$/, function(a, b){return b});    
  }
})();
if(!window.Promise){document.write("<script src=" + selfPath + "'promise.js'><" + "/script>");}
if(!window.console){window.console = {log:function(){}}}

_import("vue.min.js");
_import("../libs/element-ui/js/element-ui.js");
_import("../libs/element-ui/multi/index.js");
_import("axios.min.js");
_import("common.js");
_import("tools.js");
_import("dict.js");
if(type=="") 
{
	_import("user.js");
}
	
//_import("excel/FileSaver.js"); //_import("excel/FileSaver.js", {defer: true});
//_import("excel/xlsx.full.min.js"); //_import("excel/xlsx.full.min.js", {defer: true});
//_import("excel/tableExport.js");
_import("dialog/dialog.js");
//_import("textpopup/textpopup.js");
//右键菜单
//_import("contextmenu.js");
//右上角菜单 会给class为panel-title的加上菜单,如果不想加,给class为panel-title的div加上hidemenu="true"的属性
//_import("topmenu.js");



 function getQueryString (queryStringName,path) {
	var returnValue = "";
	var URLString = path;
	var serachLocation = -1;
	var queryStringLength = queryStringName.length;
	do {
		serachLocation = URLString.indexOf(queryStringName + "\=");
		if (serachLocation != -1) {
			if ((URLString.charAt(serachLocation - 1) == '?')
					|| (URLString.charAt(serachLocation - 1) == '&')) {
				URLString = URLString.substr(serachLocation);
				break;
			}
			URLString = URLString.substr(serachLocation + queryStringLength
					+ 1);
		}

	} while (serachLocation != -1)
	if (serachLocation != -1) {
		var seperatorLocation = URLString.indexOf("&");
		if (seperatorLocation == -1) {
			returnValue = URLString.substr(queryStringLength + 1);
		} else {
			returnValue = URLString.substring(queryStringLength + 1,
					seperatorLocation);
		}
	}
	returnValue=decodeURIComponent(returnValue);

	return returnValue;
}
